<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<html>
<head>
<title>草稿邮件</title>
<%@include file="/common/ec.jsp"%>
<%@include file="/common/meta.jsp"%>
</head>
<body>
<div class="x-panel-header">内部邮件</div>
<div class="x-toolbar" style="height: 25px;  padding:3px 5px;">
  <form action="sendIndex.do" method="post">
  <table width="99%">
    <tr>
      <td> 
	  <span>
	    <img src="${ctx}/images/icons/folder_edit.gif">
		&nbsp;<font color="#909090"><b>草稿邮件</b></font>
	  </span>
      </td>
      <td align="right">
	  	<a href="newMail.do">
	  	  <img src="${ctx}/images/icons/mail.gif">&nbsp;写邮件
	  	</a>
      </td>
    </tr>
  </table>
  </form>
</div>
<ec:table items="items" var="item" retrieveRowsCallback="limit" sortRowsCallback="limit" 
	action="index.do" 
	useAjax="false"
	doPreload="false" 
	pageSizeList="10,20,50" 
	editable="false"
	sortable="false" 
	rowsDisplayed="10" 
	generateScript="true"
	resizeColWidth="false" 
	classic="false" 
	width="100%" 
	height="320px"
	minHeight="320"
	showHeader="true"
	toolbarContent="navigation|pagejump|pagesize|refresh|extend|status">
	<ec:row>
	  <ec:column width="30" property="_s" title="No." value="${GLOBALROWCOUNT}" sortable="false" style="text-align:center"/>
	  <ec:column width="170" property="recipientNames" title="收件人" ellipsis="true" style="border-left:0px; border-right:0px;" />
	  <ec:column width="170" property="copyToNames" title="抄送人" ellipsis="true" style="border-left:0px; border-right:0px;" />
	  <ec:column width="270" property="subject" title="主题" ellipsis="true" style="border-left:0px; border-right:0px;" />
	  <ec:column width="30" property="_attch" title="附件" style="border-left:0px; border-right:0px;text-align:center;">
		<s:if test="#attr.item.fileIds != null">  
		  <img src="${ctx}/images/icons/attachment.gif" title="有附件信息">	
	    </s:if>
	  </ec:column>
	  <ec:column width="115" property="sendTime" title="创建时间" cell="date" format="yyyy-MM-dd HH:mm" style="border-left:0px;text-align:center;"/>
	  <ec:column width="70" property="_0" title="操作" style="text-align:center;" sortable="false">
		  <a href="edit.do?model.id=${item.id}" title="编辑">编辑</a>|
		  <a id="delete" href="#" onclick="remove(${item.id});" title="删除">删除</a>
		</ec:column>
	</ec:row>
</ec:table>
<script type="text/javascript">
function remove(id){
	if (confirm("确定要删除该草稿邮件吗？删除后不能恢复!")){
		document.getElementById("delete").href = "remove.do?model.id=" + id;
	    }
}
</script>
</body>
</html>